package com.home.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.home.dao.HouseAgeDao;
import com.home.model.HouseAge;
import com.home.service.HouseAgeService;
@Service("houseAgeService")
public class HouseAgeServiceImpl implements HouseAgeService{
	@Autowired
	private HouseAgeDao<HouseAge,Integer> houseAgeDao;

	public HouseAgeDao<HouseAge, Integer> getHouseAgeDao() {
		return houseAgeDao;
	}

	public void setHouseAgeDao(HouseAgeDao houseAgeDao) {
		this.houseAgeDao = houseAgeDao;
	}

	public void delete(HouseAge houseAge) {
		this.getHouseAgeDao().delete(houseAge.getId());
	}

	public HouseAge getHouseAge(Integer id) {
		return this.getHouseAgeDao().get(id);
	}

	public List<HouseAge> getList() {
		return this.getHouseAgeDao().getAll();
	}

	public void save(HouseAge houseAge) {
		this.getHouseAgeDao().save(houseAge);
	}

}
